/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.ufrn.dimap.projetodetalhadodesoftware.chatrmi.controller.treater;

import br.ufrn.dimap.projetodetalhadodesoftware.chatrmi.model.actor.ClientModel;
import br.ufrn.dimap.projetodetalhadodesoftware.chatrmi.controller.exception.CodeNotExistsException;
import br.ufrn.dimap.projetodetalhadodesoftware.chatrmi.controller.exception.TreaterNuloExeption;
import br.ufrn.dimap.projetodetalhadodesoftware.chatrmi.controller.ClientControler;
import br.ufrn.dimap.projetodetalhadodesoftware.chatrmi.model.util.Message;

/**
 *
 * @author Jorge
 */
public abstract class TreaterNotification {

    protected TreaterNotification next;
   

    public void addNext(TreaterNotification next){
        if(this.next == null){
            this.next = next;
        }else{
            this.next.addNext(next);
        }
    }

    abstract void treatNotification(ClientControler client, Message message) throws CodeNotExistsException, TreaterNuloExeption;
}
